{% extends "adminlte/base.html" %}

{% block content_title %}
    修改密码
{% endblock %}

{% block base_head_style %}
    <style type="text/css">
        .errorlist {
            list-style: none;
            padding: 0;
            color: red;
        }
    </style>
{% endblock %}

{% block content %}
    <div class="row">
        <div class="col-md-12">
            <div class="box box-primary">
                <div class="box-body">
                    <div class="row">
                        <div class="col-md-5 col-sm-12">
                            {% if 'success' in form %}
                                {{ form.success }}
                            {% endif %}
                            <form method="post" action="" role="form"
                                  id="changePasswordForm">
                                {% csrf_token %}
                                <div class="form-group">
                                    <label for="id_old_password">旧密码:</label>
                                    <input id="id_old_password" maxlength="20"
                                           name="old_password" type="password"
                                           class="form-control"
                                           placeholder="请输入当前密码"/>
                                    {{ form.old_password.errors }}
                                </div>
                                <div class="form-group">
                                    <label for="id_new_password1">新密码:</label>
                                    <input id="new_password1" maxlength="20"
                                           name="new_password1" type="password"
                                           class="form-control"
                                           placeholder="请输入新密码"/>
                                    {{ form.new_password1.errors }}
                                </div>
                                <div class="form-group">
                                    <label for="id_new_password2">确认新密码:</label>
                                    <input id="new_password2" maxlength="20"
                                           name="new_password2" type="password"
                                           class="form-control"
                                           placeholder="请再次输入新密码"/>
                                    {{ form.new_password2.errors }}
                                </div>
                                <div class="clearfix"></div>
                                <button type="submit" class="btn btn-primary">
                                    保 存
                                </button>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
{% endblock %}